package com.study.java.oop.gongze;

public class Company {
    public Employee employee[];
    public int salaries;

    public Company(Employee[] employee) {
        this.employee = employee;
    }

    void  paySalaries(){
       for (int i = 0; i < employee.length; i++) {
           if (employee[i]!=null){
               salaries += employee[i].earning();
           }

       }
       System.out.println("公司支付工资: "+salaries);
   }
}
